runtime: backfill missing block_id before snapshot packaging#11631
Closed
KirillLykov wants to merge 1 commit into
Closed
runtime: backfill missing block_id before snapshot packaging#11631KirillLykov wants to merge 1 commit into
KirillLykov wants to merge 1 commit into
Conversation
This fixes a validator crash in snapshot handling when a rooted bank has no block_id. This was triggered a fresh local cluster one-node validator running master. It seems that in some flows rooted back may still have `block_id == None` and in `handle_snapshot_request` we don't ensure that is populated. This PR ensures this and adds a test.
brooksprumo
requested changes
Mar 30, 2026
Comment on lines
+275
to
+279
| // Backfill block id for legacy/replayed banks before snapshot packaging. This prevents | ||
| // snapshot panics when a rooted bank is missing block_id. | ||
| if snapshot_root_bank.block_id().is_none() { | ||
| Bank::calculate_and_set_block_id_for_dcou(&snapshot_root_bank); | ||
| } |
There was a problem hiding this comment.
AccountsBackgroundService should not be setting the block id. If block id is not set by the time we get here, it means there's a bug somewhere else.
|
PR #11613 is supposed to fix this issue. When you saw the crash, were you running with a build older by chance? |
Author
not sure if I rebased or not. So will close for now this PR and if observe this failure again, rethink. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This fixes a validator crash in snapshot handling when a rooted bank has no block_id. This was triggered a fresh local cluster one-node validator running master.
It seems that in some flows rooted back may still have
block_id == Noneand inhandle_snapshot_requestwe don't ensure that is populated.Summary of Changes
This PR ensures
block_id != Noneand adds a test.